import Vue from 'vue'
import 'normalize.css/normalize.css' // A modern alternative to CSS resets
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import locale from 'element-ui/lib/locale/lang/zh-CN' // lang i18n
import '@/styles/index.scss' // global css
import App from './App'
import store from './store'
import router from './router'
import '@/icons' // icon
import '@/permission' // permission control
Vue.use(ElementUI, { locale })
// 安装自定义消息组件
import message from '@/plugin/message'
Vue.use(message)
import confirm from '@/plugin/confirm'
Vue.use(confirm)
import Upload from '@/components/Upload.vue'
Vue.component('upload', Upload)
import FixArea from '@/components/FixArea.vue'
Vue.component('fix-area', FixArea)
import Pagination from '@/components/Pagination.vue'
Vue.component('pagination', Pagination)
import MediaShow from '@/components/MediaShow.vue'
Vue.component('media-show', MediaShow)
import FormBlock from '@/components/FormBlock.vue'
Vue.component('form-block', FormBlock)
import TableBlock from '@/components/TableBlock.vue'
Vue.component('table-block', TableBlock)
import TableColumn from '@/components/TableColumn.vue'
Vue.component('table-column', TableColumn)
import CellMedia from '@/components/CellMedia.vue'
Vue.component('cell-media', CellMedia)
Vue.config.productionTip = false
import mixin from '@/mixin/index'
Vue.mixin(mixin)
new Vue({
  el: '#app',
  router,
  store,
  render: h => h(App)
})
